import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * bannersetting模块-轮播设置
 */
@Entity('bannersetting_banner')
export class BannersettingBannerEntity extends BaseEntity {
  @Index()
  @Column({ comment: '标题', length: 255 })
  title: string;

  @Column({ comment: '图片', length: 255 })
  image: string;

  @Column({ comment: '链接', length: 255 })
  link: string;

  @Column({ comment: '排序', default: 0 })
  sort: number;

  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;

  @Column({ comment: '类型 0-普通 1-特殊', default: 0, type: 'tinyint' })
  type: number;

  @Column({ comment: '描述', type: 'text', nullable: true })
  description: string;

  @Column({ comment: '开始时间', type: 'datetime' })
  startTime: Date;

  @Column({ comment: '结束时间', type: 'datetime' })
  endTime: Date;

  @Column({ comment: '位置', length: 255 })
  position: string;
}
